<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>容器技术演进与实践指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 700;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            background-color: #2d2d2d;
            color: #f8f8f2;
            border-radius: 0.5rem;
            position: relative;
        }
        .code-copy {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            color: #a1a1aa;
            cursor: pointer;
            transition: color 0.2s;
        }
        .code-copy:hover {
            color: #ffffff;
        }
        .timeline-item:before {
            content: '';
            position: absolute;
            left: -38px;
            top: 0;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #6e8efb;
            border: 3px solid #a777e3;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl text-center">
            <div class="flex justify-center mb-6">
                <div class="bg-white bg-opacity-20 rounded-full p-3 inline-flex">
                    <i class="fas fa-server text-2xl"></i>
                </div>
            </div>
            <h1 class="text-4xl md:text-5xl font-bold mb-4">容器技术演进与实践指南</h1>
            <p class="text-xl md:text-2xl opacity-90 mb-8">从chroot到Docker再到Kubernetes的完整技术图谱</p>
            <div class="flex flex-wrap justify-center gap-4">
                <a href="#timeline" class="px-6 py-3 bg-white text-purple-700 rounded-full font-semibold hover:bg-opacity-90 transition">
                    <i class="fas fa-history mr-2"></i>发展历程
                </a>
                <a href="#tech" class="px-6 py-3 bg-white bg-opacity-20 border border-white rounded-full font-semibold hover:bg-opacity-30 transition">
                    <i class="fas fa-microchip mr-2"></i>核心技术
                </a>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-5xl px-4 py-12">
        <!-- Timeline Section -->
        <section id="timeline" class="mb-20">
            <h2 class="text-3xl font-bold mb-8 text-center relative">
                <span class="bg-white px-4 relative z-10">技术演进时间线</span>
                <div class="absolute h-px bg-gray-200 top-1/2 left-0 right-0 -z-1"></div>
            </h2>
            
            <div class="relative pl-12">
                <div class="absolute left-0 top-0 bottom-0 w-px bg-gray-200"></div>
                
                <!-- Timeline Item 1 -->
                <div class="timeline-item relative pb-10">
                    <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                        <div class="p-6">
                            <div class="flex items-center mb-3">
                                <span class="inline-block px-3 py-1 bg-purple-100 text-purple-800 rounded-full text-sm font-semibold">1979</span>
                                <h3 class="ml-3 text-xl font-bold">chroot: 最早的隔离实验</h3>
                            </div>
                            <p class="text-gray-600 mb-4"><strong>技术原理：</strong>改变进程的根目录视图</p>
                            <p class="text-gray-600 mb-4"><i class="fas fa-code text-purple-500 mr-2"></i>Java应用场景：构建独立运行环境</p>
                            
                            <div class="code-block p-4 mb-4 rounded-lg">
                                <div class="code-copy" onclick="copyCode(this)">
                                    <i class="far fa-copy"></i>
                                </div>
                                <pre class="overflow-x-auto"><code class="text-sm"># 创建Java运行环境
mkdir -p /opt/java-env/{bin,lib64}
cp /usr/bin/java /opt/java-env/bin/
cp /usr/lib64/* /opt/java-env/lib64/
chroot /opt/java-env java -version</code></pre>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Timeline Item 2 -->
                <div class="timeline-item relative pb-10">
                    <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                        <div class="p-6">
                            <div class="flex items-center mb-3">
                                <span class="inline-block px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm font-semibold">2001</span>
                                <h3 class="ml-3 text-xl font-bold">Linux VServer: 首次进程隔离</h3>
                            </div>
                            <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
                                <div>
                                    <p class="font-semibold text-gray-700 mb-2"><i class="fas fa-check-circle text-blue-500 mr-2"></i>主要特性：</p>
                                    <ul class="list-disc pl-5 text-gray-600 space-y-1">
                                        <li>隔离进程树</li>
                                        <li>独立网络栈</li>
                                        <li>资源限制</li>
                                    </ul>
                                </div>
                                <div>
                                    <p class="font-semibold text-gray-700 mb-2"><i class="fas fa-exclamation-circle text-orange-500 mr-2"></i>历史局限：</p>
                                    <ul class="list-disc pl-5 text-gray-600 space-y-1">
                                        <li>依赖定制内核</li>
                                        <li>缺少标准化工具链</li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Core Technology Section -->
        <section id="tech" class="mb-20">
            <h2 class="text-3xl font-bold mb-8 text-center relative">
                <span class="bg-white px-4 relative z-10">核心技术解析</span>
                <div class="absolute h-px bg-gray-200 top-1/2 left-0 right-0 -z-1"></div>
            </h2>
            
            <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                <!-- Namespace -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-purple-100 p-3 rounded-full mr-4">
                                <i class="fas fa-layer-group text-purple-600 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-bold">Linux Namespace 7种隔离维度</h3>
                        </div>
                        
                        <div class="overflow-x-auto">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead class="bg-gray-50">
                                    <tr>
                                        <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Namespace类型</th>
                                        <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">隔离内容</th>
                                        <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">CLONE标志</th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-gray-200">
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">PID</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">进程ID</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">CLONE_NEWPID</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">Network</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">网络设备/端口</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">CLONE_NEWNET</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">Mount</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">文件系统挂载点</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">CLONE_NEWNS</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">UTS</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">主机名域名</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">CLONE_NEWUTS</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">IPC</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">进程间通信</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">CLONE_NEWIPC</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">User</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">用户/用户组ID</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">CLONE_NEWUSER</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">Cgroup</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">控制组</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">CLONE_NEWCGROUP</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                
                <!-- Cgroups -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-3 rounded-full mr-4">
                                <i class="fas fa-tachometer-alt text-blue-600 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-bold">Cgroups: 资源的精妙分配</h3>
                        </div>
                        
                        <p class="text-gray-600 mb-4"><strong>资源控制示例：</strong>限制Java进程内存</p>
                        
                        <div class="code-block p-4 mb-4 rounded-lg">
                            <div class="code-copy" onclick="copyCode(this)">
                                <i class="far fa-copy"></i>
                            </div>
                            <pre class="overflow-x-auto"><code class="text-sm"># 创建控制组
cgcreate -g memory:/java-app
echo 2G > /sys/fs/cgroup/memory/java-app/memory.limit_in_bytes

# 运行Java应用
cgexec -g memory:java-app java -Xmx4g -jar app.jar</code></pre>
                        </div>
                        
                        <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4">
                            <div class="flex">
                                <div class="flex-shrink-0">
                                    <i class="fas fa-exclamation-triangle text-yellow-400"></i>
                                </div>
                                <div class="ml-3">
                                    <p class="text-sm text-yellow-700">
                                        <strong>触发效果：</strong> 当内存超过2G时触发OOM Killer
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Docker Section -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 card-hover">
                <div class="p-6">
                    <div class="flex items-center mb-4">
                        <div class="bg-blue-500 p-3 rounded-full mr-4">
                            <i class="fab fa-docker text-white text-xl"></i>
                        </div>
                        <h3 class="text-xl font-bold">Docker 架构解析</h3>
                    </div>
                    
                    <div class="mermaid">
                        graph LR
                            A[客户端] --> B[Docker守护进程]
                            B --> C[容器镜像]
                            C --> D[联合文件系统]
                            D --> E[Linux内核隔离机制]
                    </div>
                    
                    <div class="mt-8">
                        <h4 class="font-bold text-lg mb-3">Java应用容器化实战</h4>
                        <p class="text-gray-600 mb-4"><strong>Dockerfile 最佳实践：</strong></p>
                        
                        <div class="code-block p-4 mb-4 rounded-lg">
                            <div class="code-copy" onclick="copyCode(this)">
                                <i class="far fa-copy"></i>
                            </div>
                            <pre class="overflow-x-auto"><code class="text-sm"># 第一阶段：构建
FROM maven:3.8-jdk-11 AS build
COPY . /app
RUN mvn -f /app/pom.xml clean package

# 第二阶段：运行
FROM openjdk:11-jre-slim
COPY --from=build /app/target/*.jar /app.jar
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s \
  CMD curl -f http://localhost:8080/actuator/health || exit 1
USER 1001:1001
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]</code></pre>
                        </div>
                        
                        <p class="text-gray-600 mb-2"><strong>构建与运行：</strong></p>
                        <div class="code-block p-4 rounded-lg">
                            <div class="code-copy" onclick="copyCode(this)">
                                <i class="far fa-copy"></i>
                            </div>
                            <pre class="overflow-x-auto"><code class="text-sm">docker build -t java-app:v1 .
docker run -p 8080:8080 --memory=2g --cpus=1.5 java-app:v1</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Podman Section -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                <div class="p-6">
                    <div class="flex items-center mb-6">
                        <div class="bg-cyan-100 p-3 rounded-full mr-4">
                            <i class="fas fa-box-open text-cyan-600 text-xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-bold">Podman: 无守护进程的容器新选择</h3>
                            <p class="text-gray-600">更安全、更轻量的容器运行时</p>
                        </div>
                    </div>
                    
                    <div class="mb-8">
                        <h4 class="font-bold text-lg mb-3">与 Docker 的核心差异</h4>
                        
                        <div class="overflow-x-auto">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead class="bg-gray-50">
                                    <tr>
                                        <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">特性</th>
                                        <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Docker</th>
                                        <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Podman</th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-gray-200">
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">架构</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">客户端/服务端</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">无守护进程</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">Root权限</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">需要</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">支持Rootless</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">系统集成</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">独立服务</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">集成systemd</td>
                                    </tr>
                                    <tr>
                                        <td class="px-4 py-3 text-sm font-medium text-gray-900">镜像签名</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">支持</td>
                                        <td class="px-4 py-3 text-sm text-gray-500">内置Sigstore</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    
                    <div>
                        <h4 class="font-bold text-lg mb-3">Rootless 容器实战</h4>
                        <div class="code-block p-4 rounded-lg">
                            <div class="code-copy" onclick="copyCode(this)">
                                <i class="far fa-copy"></i>
                            </div>
                            <pre class="overflow-x-auto"><code class="text-sm"># 普通用户运行容器
podman run -d --name java-app \
  -v ~/app-data:/data \
  -p 8080:8080 \
  docker.io/openjdk:11 java -jar /app.jar

# 生成systemd服务文件
podman generate systemd --new --name java-app > /etc/systemd/system/java-app.service
systemctl enable --now java-app</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Enterprise Section -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                <div class="p-6">
                    <div class="flex items-center mb-6">
                        <div class="bg-green-100 p-3 rounded-full mr-4">
                            <i class="fas fa-building text-green-600 text-xl"></i>
                        </div>
                        <div>
                            <h3 class="text-xl font-bold">企业级容器化: Spring Cloud 微服务部署</h3>
                            <p class="text-gray-600">生产环境最佳实践</p>
                        </div>
                    </div>
                    
                    <div class="mb-8">
                        <h4 class="font-bold text-lg mb-3">容器编排架构设计</h4>
                        <div class="mermaid">
                            graph LR
                                A[NGINX入口] --> B[服务网关]
                                B --> C[用户服务]
                                B --> D[订单服务]
                                B --> E[支付服务]
                        </div>
                    </div>
                    
                    <div class="mb-8">
                        <h4 class="font-bold text-lg mb-3">关键配置示例</h4>
                        <p class="text-gray-600 mb-2"><strong>Kubernetes Deployment:</strong></p>
                        <div class="code-block p-4 rounded-lg">
                            <div class="code-copy" onclick="copyCode(this)">
                                <i class="far fa-copy"></i>
                            </div>
                            <pre class="overflow-x-auto"><code class="text-sm">apiVersion: apps/v1
kind: Deployment
metadata:
  name: user-service
spec:
  replicas: 3
  selector:
    matchLabels:
      app: user-service
  template:
    metadata:
      labels:
        app: user-service
    spec:
      containers:
      - name: user-service
        image: registry.example.com/user-service:v1.2
        ports:
        - containerPort: 8080
        resources:
          limits:
            memory: "2Gi"
            cpu: "1"
        readinessProbe:
          httpGet:
            path: /actuator/health
            port: 8080</code></pre>
                        </div>
                    </div>
                    
                    <div>
                        <h4 class="font-bold text-lg mb-3">性能优化技巧</h4>
                        <ol class="list-decimal pl-5 space-y-3 text-gray-700">
                            <li>
                                <strong>使用Alpine基础镜像:</strong> 减少约60%体积
                                <div class="code-block p-3 mt-2 text-xs">
                                    <div class="code-copy" onclick="copyCode(this)">
                                        <i class="far fa-copy"></i>
                                    </div>
                                    <pre class="overflow-x-auto"><code>FROM openjdk:11-jre-alpine</code></pre>
                                </div>
                            </li>
                            <li>
                                <strong>配置JVM参数优化:</strong>
                                <div class="code-block p-3 mt-2 text-xs">
                                    <div class="code-copy" onclick="copyCode(this)">
                                        <i class="far fa-copy"></i>
                                    </div>
                                    <pre class="overflow-x-auto"><code>ENV JAVA_OPTS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=75"</code></pre>
                                </div>
                            </li>
                            <li>
                                <strong>开启JVM分层编译:</strong>
                                <div class="code-block p-3 mt-2 text-xs">
                                    <div class="code-copy" onclick="copyCode(this)">
                                        <i class="far fa-copy"></i>
                                    </div>
                                    <pre class="overflow-x-auto"><code>ENTRYPOINT ["java", "-XX:+TieredCompilation", "-jar", "/app.jar"]</code></pre>
                                </div>
                            </li>
                        </ol>
                    </div>
                </div>
            </div>
        </section>

        <!-- Security Section -->
        <section class="mb-20">
            <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                <!-- Security -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-red-100 p-3 rounded-full mr-4">
                                <i class="fas fa-shield-alt text-red-600 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-bold">安全与监控: 生产环境实践</h3>
                        </div>
                        
                        <div class="mb-6">
                            <h4 class="font-bold text-lg mb-3">容器安全三板斧</h4>
                            
                            <div class="space-y-4">
                                <div>
                                    <p class="font-semibold mb-2"><span class="text-red-500">1.</span> 镜像扫描:</p>
                                    <div class="code-block p-3 text-xs">
                                        <div class="code-copy" onclick="copyCode(this)">
                                            <i class="far fa-copy"></i>
                                        </div>
                                        <pre class="overflow-x-auto"><code>trivy image registry.example.com/java-app:v1</code></pre>
                                    </div>
                                </div>
                                
                                <div>
                                    <p class="font-semibold mb-2"><span class="text-red-500">2.</span> 运行时保护:</p>
                                    <div class="code-block p-3 text-xs">
                                        <div class="code-copy" onclick="copyCode(this)">
                                            <i class="far fa-copy"></i>
                                        </div>
                                        <pre class="overflow-x-auto"><code>podman run --security-opt label=type:container_runtime_t ...</code></pre>
                                    </div>
                                </div>
                                
                                <div>
                                    <p class="font-semibold mb-2"><span class="text-red-500">3.</span> 网络策略:</p>
                                    <div class="code-block p-3 text-xs">
                                        <div class="code-copy" onclick="copyCode(this)">
                                            <i class="far fa-copy"></i>
                                        </div>
                                        <pre class="overflow-x-auto"><code>apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
spec:
  podSelector:
    matchLabels:
      app: payment-service
  ingress:
  - from:
    - podSelector:
        matchLabels:
          app: order-service</code></pre>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- Monitoring -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-indigo-100 p-3 rounded-full mr-4">
                                <i class="fas fa-chart-line text-indigo-600 text-xl"></i>
                            </div>
                            <h3 class="text-xl font-bold">监控体系构建</h3>
                        </div>
                        
                        <p class="text-gray-600 mb-4"><strong>Prometheus + Grafana 监控方案:</strong></p>
                        
                        <div class="code-block p-4 rounded-lg">
                            <div class="code-copy" onclick="copyCode(this)">
                                <i class="far fa-copy"></i>
                            </div>
                            <pre class="overflow-x-auto"><code class="text-sm"># docker-compose.yml
version: '3'
services:
  prometheus:
    image: prom/prometheus
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
  grafana:
    image: grafana/grafana
    ports:
      - "3000:3000"
  java-app:
    image: java-app:v1
    environment:
      - JAVA_TOOL_OPTIONS=-javaagent:/jmx_prometheus.jar=8080:/config.yaml</code></pre>
                        </div>
                        
                        <div class="mt-4 flex items-center text-sm text-gray-500">
                            <i class="fas fa-info-circle mr-2 text-indigo-500"></i>
                            通过JMX exporter暴露Java应用指标，实现全方位监控
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-8">
        <div class="container mx-auto max-w-5xl px-4 text-center">
            <div class="flex flex-col items-center">
                <div class="mb-4">
                    <i class="fas fa-laptop-code text-2xl text-white"></i>
                </div>
                <div class="text-white font-medium mb-2">技术小馆</div>
                <a href="http://www.yuque.com/jtostring" class="text-gray-400 hover:text-white transition">http://www.yuque.com/jtostring</a>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
        
        function copyCode(element) {
            const codeBlock = element.parentElement.querySelector('code');
            const range = document.createRange();
            range.selectNode(codeBlock);
            window.getSelection().removeAllRanges();
            window.getSelection().addRange(range);
            document.execCommand('copy');
            window.getSelection().removeAllRanges();
            
            // 显示复制成功提示
            const originalIcon = element.innerHTML;
            element.innerHTML = '<i class="fas fa-check"></i>';
            setTimeout(() => {
                element.innerHTML = originalIcon;
            }, 2000);
        }
    </script>
</body>
</html>